package com.athay.diary.service;

import com.athay.diary.entity.Diary;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.security.core.Authentication;

import java.util.List;

public interface DiaryService extends IService<Diary> {
    List<Diary> listByCurrentUser(Authentication authentication); // 当前用户的日记列表
    void deleteById(Long diaryId, Authentication authentication); // 删除日记（带权限检查）
    void update(Diary diary, Authentication authentication); // 更新日记（带权限检查）
}